package cn.myfirefly.moming.common.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import cn.myfirefly.core.entity.BasePO;

@Entity
@Table(name = "mm_department")
public class MMDepartment extends BasePO implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1081715845425486265L;
	private Integer departmentSn;
	private String departmentNo;
	private String departmentName;
	private Integer parentDepartSn;
	private String departmentDesc;
	private Integer showIndex;

	public MMDepartment() {
	}

	public MMDepartment(String departmentNo, String departmentName) {
		this.departmentNo = departmentNo;
		this.departmentName = departmentName;
	}

	public MMDepartment(String departmentNo, String departmentName,
			Integer parentDepartSn, String departmentDesc, 
			String createBy, Date createDate, String modifyBy, Date modifyDate) {
		this.departmentNo = departmentNo;
		this.departmentName = departmentName;
		this.parentDepartSn = parentDepartSn;
		this.departmentDesc = departmentDesc;
		this.setCreateBy(createBy);
		this.setCreateDate(createDate);
		this.setModifyBy(modifyBy);
		this.setModifyDate(modifyDate);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "department_sn", unique = true, nullable = false)
	public Integer getDepartmentSn() {
		return this.departmentSn;
	}

	public void setDepartmentSn(Integer departmentSn) {
		this.departmentSn = departmentSn;
	}

	@Column(name = "department_no", nullable = false, length = 32)
	public String getDepartmentNo() {
		return this.departmentNo;
	}

	public void setDepartmentNo(String departmentNo) {
		this.departmentNo = departmentNo;
	}

	@Column(name = "department_name", nullable = false, length = 64)
	public String getDepartmentName() {
		return this.departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	@Column(name = "parent_depart_sn")
	public Integer getParentDepartSn() {
		return this.parentDepartSn;
	}

	public void setParentDepartSn(Integer parentDepartSn) {
		this.parentDepartSn = parentDepartSn;
	}

	@Column(name = "department_desc", length = 500)
	public String getDepartmentDesc() {
		return this.departmentDesc;
	}

	public void setDepartmentDesc(String departmentDesc) {
		this.departmentDesc = departmentDesc;
	}

	@Column(name = "show_index")
	public Integer getShowIndex() {
		return showIndex;
	}

	public void setShowIndex(Integer showIndex) {
		this.showIndex = showIndex;
	}

}
